<template>
  <PrimePageLayout>
    <div>
      <input type="text">
      TestDetailPage

      <button @click="test">test</button>
      <button @click="test1">自己跳转自己!!</button>
    </div>

  </PrimePageLayout>
</template>
<script setup>
import PrimePageLayout from '@hhd/HomeComponents/PrimePageLayout.vue';
import {useRoute, useRouter} from 'vue-router';
import {onMounted} from 'vue';
import {guid, useGlobalProperties} from '@utils';

const global = useGlobalProperties();
onMounted(() => {
  global.$loading.startLoading();
  console.log("TestDetailPage1 mounted!**************************");
  setTimeout(() => {
    global.$loading.stopLoading();
  }, 500);
});

const router = useRouter();

function test1() {
  router.push({
    name: 'testDetailPage', query: {id: guid()}});
}

function test() {
  router.push({name: 'testDetailPage2'});
}

defineOptions({
  name: 'TestDetailPage'
});
</script>